using net_work.Common.Request;
using net_work.Common.Result;
using net_work.Data.DTO.Hmw;
using net_work.Data.Entity.Hmw;

namespace net_work.IService.Hmw;

public interface IHomeworkQuestionService
{
    /// <summary>
    /// 分页查询作业题目
    /// </summary>
    /// <param name="request">查询参数</param>
    /// <returns>分页结果</returns>
    Task<PagedResult<HomeworkQuestion>> GetHomeworkQuestionsPagedAsync(PagedRequest request);

    /// <summary>
    /// 根据作业题目ID查询作业题目信息
    /// </summary>
    /// <param name="homeworkQuestionId">作业题目ID</param>
    /// <returns>作业题目信息</returns>
    Task<HomeworkQuestion?> SelectByIdAsync(long homeworkQuestionId);

    /// <summary>
    /// 插入作业题目
    /// </summary>
    /// <param name="homeworkQuestionAddRequest">新增作业题目实体</param>
    /// <returns>影响行数</returns>
    Task<int> InsertHomeworkQuestion(HomeworkQuestionAddRequest homeworkQuestionAddRequest);

    /// <summary>
    /// 更新作业题目信息
    /// </summary>
    /// <param name="homeworkQuestionUpdateRequest">更新作业题目信息</param>
    /// <returns>是否成功</returns>
    Task<int> UpdateHomeworkQuestion(HomeworkQuestionUpdateRequest homeworkQuestionUpdateRequest);

    /// <summary>
    /// 删除作业题目
    /// </summary>
    /// <param name="ids">作业题目ID集合</param>
    /// <returns>是否成功</returns>
    Task<int> DeleteHomeworkQuestionByIds(List<long> ids);
}